@extends('admin.layout.main')

@section('content')
    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="#">首页</a>
            </li>
            <li class="active"><a href="{{ url('admin/slide_list') }}">幻灯片列表</a></li>
            <li class="active"><a href="{{ url('admin/editor_slide') }}?id={{$id}}">编辑幻灯片</a></li>
        </ul><!-- /.breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">
		<span class="input-icon">
		<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
			<i class="ace-icon fa fa-search nav-search-icon"></i>
		</span>
            </form>
        </div><!-- /.nav-search -->
    </div>

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" role="form" action="/admin/add_slide" method="post" enctype="multipart/form-data">
                <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                    <tbody>
                    {{ csrf_field() }}
                    <tr>
                        <td class="center">
                            <span >* 幻灯片头像</span>
                        </td>
                        <td>
                            <img src="{{$real->img}}" width="150" height="100">
                        </td>
                    </tr>
                    <tr>
                        <td class="center">
                            <span>* 幻灯片上传</span>
                        </td>
                        <td>
                            <input type="file" name="logo">
                        </td>
                    </tr>
                    <tr>
                        <td class="center">
                            <span>* 图片标题</span>
                        </td>
                        <td>
                            <input type="text" name="title" class="col-xs-10 col-sm-5" value="{{$real->title}}">&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="center">
                            <span>* 排序</span>
                        </td>
                        <td>
                            <input type="text" name="order" class="col-xs-10 col-sm-5" value="{{$real->order}}">&nbsp;
                            <input type="hidden" name="id" class="col-xs-10 col-sm-5" value="{{$real->id}}">&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="center">
                            <span>* 跳转地址</span>
                        </td>
                        <td>
                            <input type="text" name="webpage" class="col-xs-10 col-sm-5" value="{{$real->webpage}}">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span></span>
                        </td>
                        <td>
                            <button class="btn btn-info" type="submit" >
                                <i class="ace-icon fa fa-check bigger-110"></i>
                                提交
                            </button>

                            &nbsp; &nbsp; &nbsp;
                            <button class="btn" type="reset">
                                <i class="ace-icon fa fa-undo bigger-110"></i>
                                返回
                            </button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
    </div><!-- /.main-content -->
    <script>


        //        function on_add() {
        //            var formData = new FormData($('form')[0]);
        //            formData.append('file',$(':file')[0].files[0]);
        //            console.log(formData);
        //            $.ajax({
        //                type : "POST",
        //                url:'/admin/update_user',
        //                data : {a:1},
        //                success: function(res){
        //                    if(res.status == 1){
        //                        layer.msg('修改成功',{icon:1})
        ////                            location.href= '/user/index'
        //                        location.href= '/admin/user_list'
        //                    }else{
        //                        layer.msg(res.msg, {icon: 2});
        //                    }
        //                }
        //            });
        //        }

    </script>
@endsection
